import $ from "@/utils/request"
// 登录
const loginData = (obj) => $.postAxios('/login', { account: obj.username, password: obj.password })
//获取头部信息
const getHeaderData = () => $.getAxios('/home/category/head')
//获取商品列表
const getGoodList = (obj) => $.getAxios('/category/?id=' + obj.id)
//获取商品列表选项详情页的数据
const getGoodsCont = (obj) => $.getAxios('/category/sub/filter?id=' + obj.id)
//获取商品列表选项详情页下方数据
const postGoodBomCont = () => $.postAxios('/category/goods/temporary', {})
//获取新鲜好物
const getNewGood = () => $.getAxios('/home/new')
//获取人气爆款
const getpeopltHot = () => $.getAxios('/home/hot');
//热门品牌
const getHotPinpai = () => $.getAxios('/home/brand?limit=10');
//居家美食服饰母婴
const getFours = () => $.getAxios('/home/goods');
//最新专题
const getnewGoods = () => $.getAxios('/home/special');
//详情页数据
const getXiangQ = () => $.getAxios('goods?id=3990979');
//轮播图
const banner = () => $.getAxios('/home/banner');
// const bannerData = () => $.getAxios("home/category/head")
export default { banner, getXiangQ, getnewGoods, getFours, getHotPinpai, getpeopltHot, getNewGood, loginData, getHeaderData, getGoodList, getGoodsCont, postGoodBomCont }
